#include "EngineHeader.h"
#include "GCNode.h"

namespace LSH
{
namespace Graphics
{

//------------------------------------------------------------------------------
GCNode::GCNode(void):_pParent(NULL)
{
    _name.format(_T("%s"), _T("No_Name_Node"));
}

//------------------------------------------------------------------------------
GCNode::GCNode(const String& name):_pParent(NULL)
{
    _name = name;
}

//------------------------------------------------------------------------------
GCNode::~GCNode(void)
{
}

//------------------------------------------------------------------------------
GCNode* GCNode::findChild(const String& name){
    childNodeItr node = _childNodes.find(name);
    if(node != _childNodes.end())
    {
        return node->second;
    }
    return NULL;
}

//------------------------------------------------------------------------------
bool GCNode::addChild(GCNode* pChild){
    GCNode* pNode = findChild(pChild->_name);
    if(NULL != pNode)
    {
        
        return false;
    }
    _childNodes.insert(childNodeVaule(pChild->_name, pChild));
    return true;
}

//------------------------------------------------------------------------------
GCNode* GCNode::removeChild(const String& name){
    //childNodeVaule
    return NULL;
}

//------------------------------------------------------------------------------
int GCNode::getChildNumber(){
    return 0;
}


}
} // end LSH